import app


class TenderApi:

    def __init__(self, session):
        # 获取session对象
        self.session = session
        self.url_tender = app.BASE_HOST + "/trust/trust/tender"
        self.url_tender_list = app.BASE_HOST + "/loan/tender/mytenderlist"

    # 投资接口
    def tender(self,id,amount):
        data_dict={"id": id,"depositCertificate":" -1","amount":amount}
        return self.session.post(url= self.url_tender,data=data_dict)


    # 第三方投资接口
    def third_tender(self,url,data_dict):
        return self.session.post(url =url,data=data_dict)

